<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	<title>demo</title>
	<meta name="author" content="ice" />
	<meta name="viewport" content="width=device-width; initial-scale=1.0" />
	<link rel="stylesheet" href="css/common.css" />
	<link rel="stylesheet" href="css/welcome.css" />
</head>
<body>
	<div class="top"><strong>&lt;&lt;在线试卷系统</strong>&nbsp;&nbsp;&nbsp;DESIGN BY ICE</div>
	<h1 class="wel-logo">ICE</h1>
	<h2 class="wel-des">在线试卷系统，XXX小组倾情奉献</h2>
	<form class="wel-log" action="" method="post">
		<input type="text" id="name" class="wel-input bor" onfocus="clS(1);" onblur="clS(0);" value="用户名" />
		<input type="password" id="pwd" class="wel-input bor" onfocus="clS(3);" onblur="clS(2);" value="11111111" />
		<input type="submit" class="wel-sub bor" value="登录" />
	</form>
	<div class="wel-reg">
		<a href="">注册在线试卷系统</a>
		<span>记住密码</span>
		<input type="checkbox" />
	</div>
	
	<script type="text/javascript">
	function clS(t){
		if(t < 2){
			var srch = document.getElementById('name'), val = srch.value.toString().toLowerCase(), re = /^\s+$/;
			if(t) {
				if(val == '用户名'){ 
					srch.value = '';
					srch.style.color = "#333";
				}
			} else {
				if(val == '用户名' || val == '' || re.test(val)) {
					srch.style.color = "#999";
					srch.value = '用户名';
				}
			}
		}else{
			var srch = document.getElementById('pwd'), val = srch.value.toString().toLowerCase(), re = /^\s+$/;
			if(t == 3) {
				if(val == '11111111'){ 
					srch.value = '';
					srch.style.color = "#333";
				}
			} else {
				if(val == '11111111' || val == '' || re.test(val)) {
					srch.style.color = "#999";
					srch.value = '11111111';
				}
			}	
		}
	}
	</script>
</body>
</html>